
const user = {
  state: {
    isLoggedIn: false // 登录状态
  },
  mutations: {
    setLoggedIn(state, status) {
      state.isLoggedIn = status;
    }
  },
  actions: {
    login({ commit }) {
      // 模拟登录成功后的操作
      commit('setLoggedIn', true);
    },
    logout({ commit }) {
      commit('setLoggedIn', false);
    }
  },
}

export default user
